/*    */ package com.lmpop.createIndex.search;
/*    */ 
/*    */ import com.lmpop.createIndex.searchModel.Queue;
/*    */ import com.lmpop.createIndex.searchModel.QueueValue;
/*    */ import com.lmpop.createIndex.searchModel.SearchData;
/*    */ import com.lmpop.createIndex.searchModel.SearchModel;
/*    */ import java.io.IOException;
/*    */ import java.util.ArrayList;
/*    */ import java.util.List;
/*    */ import java.util.Map;
/*    */ 
/*    */ public class NewsIndexFiles
/*    */ {
/*    */   public ProperUtil properUtil;
/*    */   private String file_path;
/*    */ 
/*    */   public NewsIndexFiles()
/*    */   {
/* 20 */     this.properUtil = new ProperUtil();
/* 21 */     this.file_path = this.properUtil.getFilePathByModel("news");
/*    */   }
/*    */ 
/*    */   public List getNewsInfo(Map paraMap) throws IOException {
/* 25 */     ArrayList showList = new ArrayList();
/* 26 */     SearchData search = new SearchData();
/* 27 */     ArrayList paraList = new ArrayList();
/*    */ 
/* 29 */     String cat_attr = ""; String keyword = ""; String recommend = ""; String in_date = ""; String news_id = "";
/* 30 */     String state_code = ""; String e = ""; String f = ""; String g = "";
/* 31 */     String order_by = "";
/* 32 */     if (paraMap.get("cat_attr") != null) cat_attr = paraMap.get("cat_attr").toString();
/* 33 */     if (paraMap.get("order_by") != null) order_by = paraMap.get("order_by").toString();
/* 34 */     if (paraMap.get("news_id") != null) news_id = paraMap.get("news_id").toString();
/* 35 */     if (paraMap.get("e") != null) e = paraMap.get("e").toString();
/* 36 */     if (paraMap.get("f") != null) f = paraMap.get("f").toString();
/* 37 */     if (paraMap.get("g") != null) g = paraMap.get("g").toString();
/* 38 */     if (paraMap.get("in_date") != null) in_date = paraMap.get("in_date").toString();
/* 39 */     if (paraMap.get("state_code") != null) state_code = paraMap.get("state_code").toString();
/* 40 */     if (paraMap.get("keyword") != null) keyword = paraMap.get("keyword").toString();
/*    */ 
/* 42 */     Queue queue = new Queue(new QueueValue[] { new QueueValue(order_by, 2, true) });
/* 43 */     paraList.add(new SearchModel("0", "cat_attr", cat_attr));
/* 44 */     paraList.add(new SearchModel("0", "in_date", in_date));
/* 45 */     paraList.add(new SearchModel("0", "news_id", news_id));
/* 46 */     paraList.add(new SearchModel("0", "e", e));
/* 47 */     paraList.add(new SearchModel("0", "f", f));
/* 48 */     paraList.add(new SearchModel("0", "g", g));
/* 49 */     paraList.add(new SearchModel("0", "state_code", state_code));
/* 50 */     paraList.add(new SearchModel("2", keyword, new String[] { "title", "news_key" }));
/* 51 */     showList = search.getSearchInfo(this.file_path, paraList, queue);
/* 52 */     return showList;
/*    */   }
/*    */ 
/*    */   public List getNewsOrderByClick(Map paraMap)
/*    */     throws IOException
/*    */   {
/* 58 */     ArrayList showList = new ArrayList();
/* 59 */     SearchData search = new SearchData();
/* 60 */     ArrayList paraList = new ArrayList();
/*    */ 
/* 62 */     String cat_attr = ""; String keyword = ""; String recommend = ""; String search_date = ""; String in_date = "";
/* 63 */     if (paraMap.get("cat_attr") != null) cat_attr = paraMap.get("cat_attr").toString();
/* 64 */     if (paraMap.get("in_date") != null) in_date = paraMap.get("in_date").toString();
/*    */ 
/* 66 */     Queue queue = new Queue(new QueueValue[] { new QueueValue("click_s", 2, true) });
/* 67 */     showList = search.getSearchInfo(this.file_path, paraList, queue);
/* 68 */     return showList;
/*    */   }
/*    */ 
/*    */   public List getNewsCommentNum(Map paraMap) throws IOException {
/* 72 */     ArrayList showList = new ArrayList();
/* 73 */     SearchData search = new SearchData();
/* 74 */     ArrayList paraList = new ArrayList();
/*    */ 
/* 76 */     String cat_attr = ""; String keyword = ""; String recommend = ""; String search_date = ""; String in_date = "";
/* 77 */     if (paraMap.get("cat_attr") != null) cat_attr = paraMap.get("cat_attr").toString();
/* 78 */     if (paraMap.get("in_date") != null) in_date = paraMap.get("in_date").toString();
/*    */ 
/* 80 */     Queue queue = new Queue(new QueueValue[] { new QueueValue("num", 2, true) });
/* 81 */     showList = search.getSearchInfo(this.file_path, paraList, queue);
/* 82 */     return showList;
/*    */   }
/*    */ }

/* Location:           F:\电商\commons-utils.jar
 * Qualified Name:     com.lmpop.createIndex.search.NewsIndexFiles
 * JD-Core Version:    0.6.0
 */